<?php
/**
 *  For searching product by partnum and description
 */
class search_by_pnum_desc extends stored_param_adaper_l_search{

    public function  get_join_line() {
        return "LEFT OUTER JOIN languages_products lp on lp.product_id=products.id";
    }

    public function  get_where_line() {
        $option = $this->get_option();
        $language = get_current_language()->id;
        return " (lp.short_desc LIKE '%$option%' OR lp.long_desc LIKE '%$option%' OR products.part_num LIKE '%$option%' ) AND lp.language_id= $language";
    }
}
?>
